package.path = package.path .. ";./../../llib/?.lua";
print(require("lSDL"));
require("drw")
require("toArray");

x = SDL_calloc(20,1);
x = toArray(x,4); --int
print(getmetatable(x));
b = toArray(x,1); --byte
print(getmetatable(x));
print(getmetatable(b));
x[0] = 0x4FF;
print(b[1]);

d = toArray(x,"double");
f = toArray(x,"float");
f[4] = 4.44444444;
d[1] = 20.8888888;
fp = f + 4;
print(f[4],d[1],fp[0]);


